import request from '@/utils/request'

// 查询post列表
export function listPost(query) {
  return request({
    url: '/wx/post/listOri',
    method: 'get',
    params: query
  })
}

// 查询post详细
export function getPost(id) {
  return request({
    url: '/wx/post/' + id,
    method: 'get'
  })
}

// 新增post
export function addPost(data) {
  return request({
    url: '/wx/post',
    method: 'post',
    data: data
  })
}

// 修改post
export function updatePost(data) {
  return request({
    url: '/wx/post',
    method: 'put',
    data: data
  })
}

// 删除post
export function delPost(id) {
  return request({
    url: '/wx/post/' + id,
    method: 'delete'
  })
}
